<?php

namespace app\api\controller;

use app\common\controller\Api;
use app\common\library\Pay;
use app\common\model\Banner;
use app\common\model\coupon\Coupon;
use app\common\model\coupon\Log;
use app\common\model\MoneyLog;
use app\common\model\option\Option;
use app\common\model\order\Order;
use app\common\model\red\Log as RedLog;
use app\common\model\User;
use think\cache\driver\Redis;

/**
 * 首页接口
 */
class Index extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];


    public function ceshi()
    {
    //    MoneyLog::subcommission('149.5',44,'NO202303022005043676');
        // User::nextGroup(0,1);

    }
    /**
     * 首页
     *
     */
    public function index()
    {
        $banner = Banner::all();
        $video = config('site.video') ? cdnurl(config('site.video'), true) : '';
        $coupon = Coupon::getCoupon($this->auth->id);
        $market_value = Option::market();
        $this->success('请求成功', compact('banner', 'video', 'coupon','market_value'));
    }
}
